package com.sphd.emanu.fragment.cardnum;

import android.content.Context;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.bank.CardNumMessage;
import com.wzutils.L;

import java.util.Map;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class CardNumPresenter extends BasePresenterImpl<CardNumContract.View> implements CardNumContract.Presenter{

    @Override
    public void getAccountPeriodListByAccount(Map<String, String> map) {
        emanuService.getAccountPeriodListByAccount(map).enqueue(new Callback<CardNumMessage>() {
            @Override
            public void onResponse(Call<CardNumMessage> call, Response<CardNumMessage> response) {
                L.e(response.toString());
                L.e(map.toString());
                mView.setBean(response.body());
            }

            @Override
            public void onFailure(Call<CardNumMessage> call, Throwable t) {
                Error(t);
            }
        });
    }
}
